/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.lardocelar.core;

import br.com.lardocelar.core.basededados.Virtual;
import java.util.HashMap;
import java.util.Map;

/**
 *
 * @author LeandroL
 */
public final class BaseDeDadosFactory {
    private static BaseDeDadosFactory baseDeDadosFactory;
    private Map<String, BaseDeDados> mapaBaseDeDados;
    
    private BaseDeDadosFactory()
    {
        mapaBaseDeDados = new HashMap<>();
        Virtual virtual = new Virtual();
        mapaBaseDeDados.put(virtual.getId(), virtual);
    }
    
    public static BaseDeDados buildBaseDeDados(String baseDeDados){
        if(baseDeDadosFactory == null) {
            baseDeDadosFactory = new BaseDeDadosFactory();    
        }
        return baseDeDadosFactory.mapaBaseDeDados.get(baseDeDados);
    }
}
